from mashangpa.responce_parse.questionResponceParser import *

class ParserFactory():

    _parser_map = {
        1: OneQuestionParser,
        2: TwoQuestionParser,
        3: ThreeQuestionParser,
        4: FourQuestionParser,
        5: FiveQuestionParser,
        6: SixQuestionParser,
        7: SevenQuestionResponseParser,
        8: EightQuestionResponseParser,
        9: NineQuestionResponseParser,
        10:TenQuestionResponseParser,
    }

    @classmethod
    def get_parser(cls, qustion_number):
        parser_cls = cls._parser_map[qustion_number]

        if not parser_cls:
            raise ValueError(f"不支持的内容类型：{content_type}")
        return parser_cls()
